package com.etung.iot.demo.modles;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.databind.PropertyNamingStrategy;
import com.fasterxml.jackson.databind.annotation.JsonNaming;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.NotNull;
import java.util.Date;

@Data
@JsonNaming(PropertyNamingStrategy.SnakeCaseStrategy.class)
@TableName("iot_user")
@ApiModel(value = "用户信息")
public class UserEntity {
    private String id;
    @NotNull(message = "用户名不能为空")
    @ApiModelProperty(required = true,notes ="用户名")
    private String username;
    @NotNull(message = "账号密码不能为空")
    @ApiModelProperty(required = true,notes ="密码")
    private String password;
    private String salt;
    @TableField("create_time")
    private Date createTime;
}
